package com.shy;

/**
 * Created by huangyang on 2017/2/6.
 */
public class CustomerFactory {
    public static final String[] names = {"Rob", "Joe", "Julie"};

    public static AbsrtactCustomer getCustomer(String name) {
        for (int i=0; i < names.length; i++) {
            if (names[i].equalsIgnoreCase(name)) {
                return new RealCustomer(name);
            }

        }
        return new NullCustomer();
    }
}
